
#include "led_channel.h"

uint8_t channel_power[CHANNEL_COUNT];

/** \defgroup PwmChannels
* @{
*/
void SetChannelPower(uint8_t channel, uint16_t power)
{
  switch (channel)
  {
    case 0 :
    {
      SET_CHANNEL1_POWER(power);
      SET_CHANNEL2_POWER(power);
      SET_CHANNEL3_POWER(power);
      SET_CHANNEL4_POWER(power);
      SET_CHANNEL5_POWER(power);
      SET_CHANNEL6_POWER(power);
      break;
    }
    case 1 :
    {
      SET_CHANNEL1_POWER(power);
      break;
    }
    case 2 :
    {
      SET_CHANNEL2_POWER(power);
      break;
    }
    case 3 :
    {
      SET_CHANNEL3_POWER(power);
      break;
    } 
    case 4 :
    {
      SET_CHANNEL4_POWER(power);
      break;
    }
    case 5 :
    {
      SET_CHANNEL5_POWER(power);
      break;
    } 
    case 6 :
    {
      SET_CHANNEL6_POWER(power);
      break;
    }
  }
}

uint16_t GetChannelPower(uint8_t channel)
{
  switch (channel) 
  {
    case 1 : {
      return GetPowerChannel1();
    }
    case 2 : {
      return GetPowerChannel2();
    }  
    case 3 : {
      return GetPowerChannel3();
    }
    case 4 : {
      return GetPowerChannel4();
    }
    case 5 : {
      return GetPowerChannel5();
    }
    case 6 : {
      return GetPowerChannel6();
    }
  }
  return 0;
}
/* @} */